<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 800px;
            margin: 200px auto;
            color: red;
            text-align: center;
            font: 600 30px/30px "simsun";
        }
    </style>
</head>

<body>
    <div></div>
    <script>
        function getCurrentDate() {
            const date = new Date();
            const year = date.getFullYear();
            const month = date.getMonth();
            const hao = date.getDate();
            const week = date.getDay();
            const arr = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']

            return "今天是：" + year + "年" + (month + 1) + '月' + hao + '号' + arr[week];
        }
        const div = document.getElementsByTagName("div")[0];
        div.innerText = getCurrentDate();
    </script>
</body>

</html>